package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

import com.ruoyi.system.domain.SysBrowsingHistory;
import com.ruoyi.system.domain.SysUsers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCollectionMapper;
import com.ruoyi.system.domain.SysCollection;
import com.ruoyi.system.service.ISysCollectionService;

/**
 * 收藏Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-01
 */
@Service
public class SysCollectionServiceImpl implements ISysCollectionService {
    @Autowired
    private SysCollectionMapper sysCollectionMapper;

    /**
     * 查询收藏
     *
     * @param collectionId 收藏主键
     * @return 收藏
     */
    @Override
    public SysCollection selectSysCollectionByCollectionId(Long collectionId) {
        return sysCollectionMapper.selectSysCollectionByCollectionId(collectionId);
    }

    /**
     * 查询收藏列表
     *
     * @param sysCollection 收藏
     * @return 收藏
     */
    @Override
    public List<SysCollection> selectSysCollectionList(SysCollection sysCollection) {
        return sysCollectionMapper.selectSysCollectionList(sysCollection);
    }

    /**
     * 新增收藏
     *
     * @param sysCollection 收藏
     * @return 结果
     */
    @Override
    public int insertSysCollection(SysCollection sysCollection) {
        return sysCollectionMapper.insertSysCollection(sysCollection);
    }

    /**
     * 修改收藏
     *
     * @param sysCollection 收藏
     * @return 结果
     */
    @Override
    public int updateSysCollection(SysCollection sysCollection) {
        return sysCollectionMapper.updateSysCollection(sysCollection);
    }

    /**
     * 批量删除收藏
     *
     * @param collectionIds 需要删除的收藏主键
     * @return 结果
     */
    @Override
    public int deleteSysCollectionByCollectionIds(Long[] collectionIds) {
        return sysCollectionMapper.deleteSysCollectionByCollectionIds(collectionIds);
    }

    /**
     * 删除收藏信息
     *
     * @param collectionId 收藏主键
     * @return 结果
     */
    @Override
    public int deleteSysCollectionByCollectionId(Long collectionId) {
        return sysCollectionMapper.deleteSysCollectionByCollectionId(collectionId);
    }
}
